<?php 
require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'../DAO/Ps_payment_ccDAO.php';
class Ps_payment_ccService
{
	public function create(BaseContext $context, ServiceResult $result, Ps_payment_ccDomain $ps_payment_ccDomain)
	{
		try
		{
			$ps_payment_ccDAO = new Ps_payment_ccDAO($context);
			$ps_payment_ccDAO->create($ps_payment_ccDomain);
			$result->setSuccess();
		}
		catch (Exception $e)
		{
			$context->logException($e);
			$result->setException($e);
		}
	}

	public function update(BaseContext $context, ServiceResult $result, Ps_payment_ccDomain $ps_payment_ccDomain)
	{
		try
		{
			$ps_payment_ccDAO = new Ps_payment_ccDAO($context);
			$ps_payment_ccDAO->update($ps_payment_ccDomain);
			$result->setSuccess();
		}
		catch (Exception $e)
		{
			$context->logException($e);
			$result->setException($e);
		}
	}

	public function delete(BaseContext $context, ServiceResult $result, $oid)
	{
		try
		{
			$ps_payment_ccDAO = new Ps_payment_ccDAO($context);
			$ps_payment_ccDAO->delete($oid);
			$result->setSuccess();
		}
		catch (Exception $e)
		{
			$context->logException($e);
			$result->setException($e);
		}
	}

	public function findByOid(BaseContext $context, ServiceResult $result, $oid)
	{
		try
		{
			$ps_payment_ccDAO = new Ps_payment_ccDAO($context);
			$ps_payment_ccDomain = $ps_payment_ccDAO->findByOid($oid);
			$result->setSuccess();
			return $ps_payment_ccDomain;
		}
		catch (Exception $e)
		{
			$context->logException($e);
			$result->setException($e);
		}
	}

	public function findAll(BaseContext $context, ServiceResult $result)
	{
		try
		{
			$ps_payment_ccDAO = new Ps_payment_ccDAO($context);
			$ps_payment_ccDomainArr = $ps_payment_ccDAO->findAll();
			$result->setSuccess();
			return $ps_payment_ccDomainArr;
		}
		catch (Exception $e)
		{
			$context->logException($e);
			$result->setException($e);
		}
	}

}
?>